package org.angelica.modules.account.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.angelica.core.common.AccessToken;
import org.angelica.modules.account.entity.AccUserDO;
import org.angelica.modules.account.query.AccUserQuery;

import java.util.List;

/**
 * <p>
 * 管理员表 服务类
 * </p>
 *
 * @author aizhimin
 * @since 2019-05-12
 */
public interface AccUserService extends IService<AccUserDO> {

    /**
     * 用户登录
     * @param username
     * @param password
     * @return AccessToken
     */
    AccessToken login(String username, String password);

    /**
     * 用户注册
     * @param username
     * @param password
     * @param nickname
     * @return
     */
    AccessToken regist(String username, String password,String nickname);

    /**
     * 查询当前用户的权限
     * @param currentUserId
     * @return
     */
    List<String> listMyPermission(Long currentUserId);

    /**
     * 查询用户
     * @param accUserQuery
     * @return
     */
    IPage<AccUserDO> listAccUser(AccUserQuery accUserQuery);
}
